package com.hmall.search.web;

import com.hmall.feign.dto.PageDTO;
import com.hmall.feign.pojo.ItemDoc;
import com.hmall.search.pojo.RequestParams;
import com.hmall.search.service.ISearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/search")
public class searchController {

    @Autowired
    private ISearchService searchService;
    @PostMapping("/list")
    public PageDTO<ItemDoc> list(@RequestBody RequestParams params) {
        return searchService.search(params);
    }

}
